# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=android-udev-rules
pkgver=20220611
pkgrel=0
pkgdesc="Android udev rules list"
url="https://github.com/M0Rf30/android-udev-rules"
arch="noarch"
license="GPL-3.0-only"
depends="udev"
source="https://github.com/M0Rf30/android-udev-rules/archive/$pkgver/android-udev-rules-$pkgver.tar.gz"
options="!check" # no testsuite provided

prepare() {
	default_prepare

	# use plugdev as the group permitted to use adb devices
	sed -i 's/adbusers/plugdev/' 51-android.rules
}

package() {
	install -Dm644 51-android.rules -t "$pkgdir"/usr/lib/udev/rules.d/
}

sha512sums="
df72283626b9674d63afec0c285f4159b5269b3a1ed13271065d3080b1ba1045ace7f4c972377212b42f0fd132b15ed49fe413505563c716be8b49741e773b64  android-udev-rules-20220611.tar.gz
"
